package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-04-27.
 */
@Entity
@Table(name = "eguard_bt", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class EguardBtEntity extends IAcross
{
	public EguardBtEntity()
	{
		super();
	}

	public EguardBtEntity(IAcross ia)
	{
		super(ia);
	}

    private int ebtId;
    private int eguardId;
    private String bluetoothKey;
    private String bluetoothName;
    private String mac;
    private String type;
    private Timestamp startDate;
    private Timestamp endDate;
    private Timestamp lastUpdate;
    private Integer updateId;
    private String uuid;
    private String btNo;

    @Id
    @Column(name = "ebt_id")
    @GeneratedValue
    public int getEbtId() {
        return ebtId;
    }

    public void setEbtId(int ebtId) {
        this.ebtId = ebtId;
    }

    @Basic
    @Column(name = "eguard_id")
    public int getEguardId() {
        return eguardId;
    }

    public void setEguardId(int eguardId) {
        this.eguardId = eguardId;
    }

    @Basic
    @Column(name = "bluetooth_key")
    public String getBluetoothKey() {
        return bluetoothKey;
    }

    public void setBluetoothKey(String bluetoothKey) {
        this.bluetoothKey = bluetoothKey;
    }

    @Basic
    @Column(name = "bluetooth_name")
    public String getBluetoothName() {
        return bluetoothName;
    }

    public void setBluetoothName(String bluetoothName) {
        this.bluetoothName = bluetoothName;
    }

    @Basic
    @Column(name = "mac")
    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "start_date")
    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    @Basic
    @Column(name = "end_date")
    public Timestamp getEndDate() {
        return endDate;
    }

    public void setEndDate(Timestamp endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "last_update")
    public Timestamp getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Timestamp lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    @Basic
    @Column(name = "update_id")
    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    @Basic
    @Column(name = "uuid")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "bt_no")
    public String getBtNo() {
        return btNo;
    }

    public void setBtNo(String btNo) {
        this.btNo = btNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EguardBtEntity that = (EguardBtEntity) o;

        if (ebtId != that.ebtId) return false;
        if (eguardId != that.eguardId) return false;
        if (bluetoothKey != null ? !bluetoothKey.equals(that.bluetoothKey) : that.bluetoothKey != null) return false;
        if (bluetoothName != null ? !bluetoothName.equals(that.bluetoothName) : that.bluetoothName != null)
            return false;
        if (btNo != null ? !btNo.equals(that.btNo) : that.btNo != null) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (lastUpdate != null ? !lastUpdate.equals(that.lastUpdate) : that.lastUpdate != null) return false;
        if (mac != null ? !mac.equals(that.mac) : that.mac != null) return false;
        if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (updateId != null ? !updateId.equals(that.updateId) : that.updateId != null) return false;
        if (uuid != null ? !uuid.equals(that.uuid) : that.uuid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ebtId;
        result = 31 * result + eguardId;
        result = 31 * result + (bluetoothKey != null ? bluetoothKey.hashCode() : 0);
        result = 31 * result + (bluetoothName != null ? bluetoothName.hashCode() : 0);
        result = 31 * result + (mac != null ? mac.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (lastUpdate != null ? lastUpdate.hashCode() : 0);
        result = 31 * result + (updateId != null ? updateId.hashCode() : 0);
        result = 31 * result + (uuid != null ? uuid.hashCode() : 0);
        result = 31 * result + (btNo != null ? btNo.hashCode() : 0);
        return result;
    }
}
